package cn.btks.databasehandler.handle.service;

import cn.btks.commonserver.result.ResultState;
import cn.btks.databasehandler.handle.pojo.BackUpResult;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author lijun
 * @Date 2020/12/28 12:08
 */
public interface BackUpResultService {

    /**
     * 按条件分页查询备份配置定时执行结果信息
     * @param page
     * @param pageSize
     * @param configName
     * @param configMode
     * @param configCycle
     * @return
     */
    ResultState findPagesByConfigNameAndConfigModeAndConfigCycle(Integer page, Integer pageSize, String configName, Integer configMode, Integer configCycle);

    /**
     * 保存备份结果
     * @param backUpResult
     * @return
     */
    ResultState save(BackUpResult backUpResult);

    /**
     * 更新备份结果
     * @param backUpResult
     * @return
     */
    ResultState update(BackUpResult backUpResult);

    /**
     * 恢复备份文件
     * @param backUpResultId
     * @return
     */
    ResultState resumeConfig(Long backUpResultId) throws SQLException;

    /**
     * 根据ID删除备份结果
     * @param id
     * @return
     */
    ResultState delete(Long id);
}
